home *** CD-ROM | disk | FTP | other *** search
/ PC-X 1997 October / pcx14_9710.iso / swag / delphi.swg / 0064_Remove title bar in MDI child form.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-11-24  |  660 b   |  25 lines

  1.  
  2. type
  3.   TForm2 = class(TForm)
  4.     { other stuff above }
  5.     procedure CreateParams(var Params: TCreateParams); override;
  6.     { other stuff below }
  7.   end;
  8.  
  9.  
  10. procedure TForm2.CreateParams(var Params: TCreateParams);
  11. begin
  12.   inherited CreateParams(Params);
  13.   Params.Style := Params.Style and not WS_OVERLAPPEDWINDOW or WS_BORDER
  14. end;
  15.  
  16.  
  17. For an MDI child form, setting the BorderStyle to bsNone does NOT remove
  18. the title bar. (This is mentioned in the help).  This does it:
  19.  
  20. Procedure tMdiChildForm.CreateParams( var Params : tCreateParams ) ;
  21. Begin
  22.    Inherited CreateParams( Params ) ;
  23.    Params.Style := Params.Style and (not WS_CAPTION) ;
  24. End ;
  25.